package com.gkzf.ai.module.crm.controller.admin.product.vo.productMatch;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.gkzf.ai.framework.excel.core.annotations.DictFormat;
import com.gkzf.ai.framework.excel.core.convert.DictConvert;
import com.gkzf.ai.module.crm.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

@Schema(description = "管理后台 - CRM 用户匹配产品结果 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProductMatchRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3900")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "征信报告详情id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26739")
    @ExcelProperty("征信报告详情id")
    private Long creditBasicId;

    /**
     * 小程序标识
     */
    @Schema(description = "小程序标识")
    private String userOpenId;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "好产品")
    @ExcelProperty("产品名称")
    private String name;

    @Schema(description = "利率(%)", example = "2.34")
    @ExcelProperty( "利率(%)")
    private String interestRate;

    @Schema(description = "办理周期  0: 1天  1: 7天  2: 30天", example = "1")
    @ExcelProperty( "办理周期")
    private Integer processingCycle;

    @Schema(description = "最大限额", requiredMode = Schema.RequiredMode.REQUIRED, example = "8911")
    @ExcelProperty("最大限额")
    private BigDecimal maxQuota;

    @Schema(description = "贷款期限", requiredMode = Schema.RequiredMode.REQUIRED,example = "2")
    @ExcelProperty(value = "贷款期限", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.CRM_PRODUCT_UNIT)
    private Integer loansDeadline;

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("产品编号")
    private String productNo;

    @Schema(description = "匹配状态0：成功 1：失败", example = "1")
    @ExcelProperty("匹配状态0：成功 1：失败")
    private Integer status;

    @Schema(description = "不匹配的原因 用户的")
    @ExcelProperty("不匹配的原因 用户的")
    private String userCondition;

    @Schema(description = "不匹配的原因 产品的")
    @ExcelProperty("不匹配的原因 产品的")
    private String productCondition;

    @Schema(description = "匹配失败的描述")
    @ExcelProperty("匹配失败的描述")
    private String errorResult;

    @Schema(description = "合作机构 字典配置")
    private String cooperationInstitution;

    @Schema(description = "合作机构 字典配置")
    private String cooperationInstitutionUrl;

    /**
     * 可贷额度
     */
    @Schema(description = "可贷额度")
    private String creditLimit;

}